home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
chrchpr4.arc
/
FCREPORT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
8KB
|
252 lines
* Program FCREPORT - Prints various reports of everyone in MEMBERS
Select primary
Store T to LEVEL2
Do while LEVEL2
Erase
@ 1,1 say chname
@ 1,62 say curdate
@ 2,1 say 'DATA DISK = '+D
@ 3,10 say ' FULL CHURCH PROCESSING'
@ 3,66 say '2-/FCREPORT/'
@ 5,10 say '0) One-line display'
@ 6,10 say '1) All membership information [FI]'
@ 7,10 say '2) Briefer two-line report [TL]'
@ 8,10 say '3) One-line report, by offering envelope number [OL]'
@ 9,10 say '4) Full-church Directory [FD]'
@ 10,10 say '5) SPECIAL DATES / FCSDATES'
@ 11,10 say '6) MAILING LABELS - All members/attenders, by family [ML]'
@ 12,10 say '7) MAILING LABELS - All voting members [ML]'
@ 13,10 say '8) MAILING LABELS - All offering envelope numbers [ML]'
@ 14,10 say '9) Full-church attendance marking, reports / FCATTEND'
?
Accept ' Enter selection ' to MSEL
?
Store CHNAME to CXNAME
Store F to validd
Do while .NOT. validd
Store T to VALIDD
Do CASE
CASE MSEL='0'
Store d+':MEMBERS' to mfile
Use &MFILE index &MFILE
Accept 'Enter selection criteria (<retn> = all)' to xsel
If xsel=' '
Store 'validd' to xsel
endif
? chname,'Membership Report ',curdate
?
Store T to beginng
Do while .not. EOF
If .not. Beginng
? ss:sc:memb,$(last:name,1,12),$(first:name,1,10),home:phone,address
SKIP
endif
Store F to beginng
Do while .not. (&XSEL).and..not.EOF
SKIP
enddo
enddo
CASE MSEL = '1'
Store d+':MEMBERS index '+d+':MEMBERS' to MFILE
Store CXNAME+' - Full Information Report' to CNAME
Store 'ALL' to ANAME1
Store 'ANAME1' to ANAME
Store '$(MEMBSTATUS,2,1)="*"' to BNAME
Do FCREPT1.CMD
CASE MSEL='2'
Select secondary
Use MDIRFILE index MDIRFILE
Select primary
Store d+':MEMBERS index '+d+':members' to MFILE
USE &MFILE
Store CXNAME+' - Brief Full-Church Report' to CNAME
Store 'ALL' to ANAME1
Store 'ANAME1' to ANAME
Store "$(membstatus,2,1)='*'" to BNAME
Store 'ACTIV:' to othheadr
Store 'SP:ACTIVTY' to othnam1
Store 'SS:SC:MEMB' to FCOLUMN
Store 'Sm.Church' to fcolhdr
Do MTWOLINE.CMD
CASE MSEL = '3' .or. !(MSEL)='8'
Store d+':OFFERNDX.NDX' to BNAME
If .not. file(BNAME)
? 'Now indexing MEMBERS file by offering envelope.'
Store d+':MEMBERS' to ANAME
USE &ANAME
Set talk on
Index on offeringen to &BNAME
Set talk off
endif
endif
Store d+':MEMBERS index '+d+':OFFERNDX' to MFILE
USE &MFILE
Store 'str(offeringen,4)' to ANAME
Store ' offeringen=0 ' to BNAME
Store ' OFFERING ENVELOPES ' to CNAME
Find 1
If #=0
Find 2
If #=0
Find 3
If #=0
? 'Offering envelopes 1,2, or 3 are not assigned to anyone, as required.'
Accept 'Press <retn> ' to XX
RETURN
endif
endif
endif
If MSEL = '3'
Store # to curenvl
Do MS1LINE.CMD
else
Select secondary
Use MDIRFILE index MDIRFILE
GOTO 19
Store val($(spact,28,2)) to MLSPACNG
SKIP
Store val($(spact,28,2)) to mlinespp
SKIP
Store val($(spact,28,2)) to MLCOL1
SKIP
Store val($(spact,29,2)) to MLCOL2
USE
Store MLINESPP-1 to MAXLINE
Select primary
? 'Now printing Mailing Labels, all people with offering envelopes.'
Set format to print
Store 'str(offr,5)' to XNAME
Store '1' to C
Store 0 to curline
Do while .not. EOF
Store val($(familycode,8,1)) to fcode
Store trim(last:name) to lname
Store trim(first:name) to fname
Store offeringen to OFFR
Store address to xaddr
Store trim(city:state)+' '+zip to cs
SKIP
If .not. EOF
If offeringen=offr
Store val($(familycode,8,1)) to gcode
If gcode<fcode
Store trim(first:name)+' and '+fname to fname
else
Store fname+' and '+trim(first:name) to fname
endif
SKIP
endif
endif
Store fname+' '+lname to names
If len(names)>30
Store $(names,1,30) to names
endif
If MLCOL2=0
@ curline,MLCOL1 say NAMES
@ curline,MLCOL1+30 say &xname
@ curline+1,MLCOL1 say XADDR
@ curline+2,MLCOL1 say CS
Store curline+MLSPACNG to curline
else
Store names to NAMEC&C
Store &XNAME to XNAME&C
Store xaddr to ADDRC&C
Store CS to CITYC&C
If C='2'
@ curline,MLCOL1 say NAMEC1
@ curline,MLCOL1+30 say XNAME1
@ curline,MLCOL2 say NAMEC2
@ curline,MLCOL2+30 say XNAME2
@ curline+1,MLCOL1 say ADDRC1
@ curline+1,MLCOL2 say ADDRC2
@ curline+2,MLCOL1 say CITYC1
@ curline+2,MLCOL2 say CITYC2
Store curline+MLSPACNG to curline
Store '1' to C
else
Store '2' to C
endif
endif
If curline>MAXLINE
EJECT
Store 0 to curline
endif
enddo
If C='1' .and. MLCOL2>0
@ curline,MLCOL1 say NAMEC1
@ curline,MLCOL1+30 say LABELC1
@ curline+1,MLCOL1 say ADDRC1
@ curline+2 say CITYC1
endif
EJECT
Set format to screen
endif
Set DELETED on
Release MLCOL1,MLCOL2,MLINESPP,MLSPACNG,MAXLINE,XNAME,FCODE,LNAME,OFFR
rELEASE CS,XADDR,GCODE,C,NAMES,ADDRC1,ADDRC2,NAMEC1,NAMEC2
CASE MSEL = '4'
Do FCREPT4.CMD
CASE MSEL = '5'
Do FCSDATES.CMD
CASE !(MSEL) = '6'
Accept 'Does the FCMEMBRS file have the latest changes from MUPDATE? ' to XY
If !(XY)='Q'
RETURN
endif
If !(XY)<>'Y'
Do MGFCROST.CMD
endif
Store d+':FCMEMBRS index '+d+':FCMEMBRS' to SPFILE
If file(SPFILE)
Store 'ALL' to ANAME1
Store 'ANAME1' to ANAME
Store "$(membstatus,2,1)='*'" to BNAME
Store ' ' to XX
Store 'XX' to XNAME
DO MSPFMAIL.CMD
else
? 'File ',SPFILE,' not present on data disk.'
endif
CASE !(MSEL)='7'
Store d+':MEMBERS index '+d+':MEMBERS' to SPFILE
If .not. file(SPFILE)
? 'File ',SPFILE,' does not exist on "',d,'" disk.'
else
Store val($(date(),7,2))-voteage to yearval
Store val($(date(),7,2)+$(date(),1,2))-voteage*100 to votedate
Store str(yearval,2) to yearstr
Set format to print
Store 'VAL($(birthdate,7,2)+$(birthdate,1,2)) > votedate' to inbdate
Store inbdate+' .or. !(Membstatus)<>"Y" ' to bname
Store 'ANAME1' to ANAME
Store 'ALL' to ANAME1
Store ' ' to XX
Store 'XX' to XNAME
Do MSPFMAIL.CMD
endif
CASE !(MSEL) = '9'
Do FCATTEND.CMD
CASE !(MSEL)='Q'
Store F to LEVEL2
otherwise
Accept 'Illegal selection. Please enter again ' to MSEL
Store F to validd
endcase
enddo
If LEVEL2
Set format to screen
Accept 'Report is complete. Press <retn> ' to XX
endif
enddo
RETURN
mbstatus,2,1)='*'" to BNAME
Store 'ACTIV:' to othheadr
Store 'SP:ACTIVTY' to othnam1
Store 'SS:SC:MEMB' to FCOLUMN
Store 'Sm.Church' to fcolhdr
Do MTWOLINE.CMD
CASE MSEL = '3' .or. !(MSEL)='8'
Store d+':OFFERNDX.NDX' to BNAME
If .not. file(BNAME)
?